﻿using System.Collections.Generic;
using System.Web.Mvc;
using System.Web.Routing;
//using Orchard.Blogs.Routing;
using Orchard.Mvc.Routes;

namespace Guang.UserGeolocation
{
    public class Routes : IRouteProvider
    {

        public void GetRoutes(ICollection<RouteDescriptor> routes)
        {
            foreach (var routeDescriptor in GetRoutes())
                routes.Add(routeDescriptor);
        }

        public IEnumerable<RouteDescriptor> GetRoutes()
        {
            return new[] {
                             new RouteDescriptor {
                                                     Route = new Route(
                                                         "GuangGeolocation",
                                                         new RouteValueDictionary {
                                                                                      {"area", "Guang.UserGeolocation"},
                                                                                      {"controller", "Save2DB"},
                                                                                      {"action", "Create"}
                                                                                  },
                                                         new RouteValueDictionary(),
                                                         new RouteValueDictionary {
                                                                                      {"area", "Guang.UserGeolocation"}
                                                                                  },
                                                         new MvcRouteHandler())
                                                 }
                            
                            
                         };
        }
    }
}

